package demo06.subclassSingletion;

public class SingletonTestDrive {
	public static void main(String[] args) {
		Singleton foo = CoolerSingleton.getInstance();
		Singleton bar = HotterSingleton.getInstance();
		System.out.println(foo);
		System.out.println(bar);
 	}
	/*  结果显示子类的地址相同，是同一个对象
	demo06.subclassSingletion.Singleton@42aab87f
	demo06.subclassSingletion.Singleton@42aab87f
	*/
}
